package wjh.mapper;

import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;
import wjh.pojo.Message;

import java.util.List;

@Repository
public interface wyMessageMapper {

    List<Message> like(@Param("likename")  String likename);

    @Select("select *from message")
    List<Message> findAll();
    @Insert("insert into message values (null,#{time},#{title},#{content})")
    void addMessage(Message message);
    @Select("DELETE FROM message WHERE id=#{value}")
    void deleteMessageByid(int ids);
@Select("select *from message where id=#{value}")
    Message findMessageById(int id);

    void updateMessage(Message message);
}
